Typed stack allocation

نویسنده

  • Brian Brooks
چکیده

The verification of memory safety–no program will crash when referencing memory–falls into two categories. A runtime system may enforce memory safety at a cost. Or, we may rely on error-prone programmers. Runtime overhead, most noticeably garbage collection, is undesirable in embedded or real-time systems. The frequency of collection points is not deterministic. Languages that rely on garbage collection suffer from poor cache locality, occupy more memory than necessary, and usually spend more time copying data throughout memory hierarchy than performing meaningful computations. With enough memory, Appel [2] claims that it is more expensive to explicitly free memory than to leave it for a garbage collector. While garbage collection yields simpler and cleaner syntax, it is worth understanding the circumstances under which garbage collection can be ‘cheaper’ than manually deallocating memory. The result of Appel’s work states that garbage collection becomes less expensive when you have seven times as much memory as you have data within your program. Relying on programmers to safely and explicitly allocate, access, and deallocate memory has been the infamous source of unreliable software. There are many advantages to explicit memory management e.g. deallocating memory immediately after it’s last access instead of waiting for a GC to reclaim it. However, this ad-hoc method of verification has proven over time that secure software systems require a machine to verify memory safety. Why is it that the most popular techniques for guaranteeing memory safety impose runtime overhead?

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Stack-Based Typed Assembly Language

In previous work, we presented a Typed Assembly Language (TAL). TAL is sufficiently expressive to serve as a target language for compilers of high-level languages such as ML. This work assumed such a compiler would perform a continuation-passing style transform and eliminate the control stack by heap-allocating activation records. However, most compilers are based on stack allocation. This pape...

متن کامل

Implementation of the Typed Call - by - Value - calculus using a Stack ofRegionsMads

We present a translation scheme for the polymorphi-cally typed call-by-value-calculus. All runtime values , including function closures, are put into regions. The store consists of a stack of regions. Region inference and eeect inference are used to infer where regions can be allocated and de-allocated. Recursive functions are handled using a limited form of polymor-phic recursion. The translat...

متن کامل

Implementation of the Typed Call-by-Value λ-calculus using a Stack of Regions

We present a translation scheme for the polymorphically typed call-by-value λ-calculus. All runtime values, including function closures, are put into regions. The store consists of a stack of regions. Region inference and effect inference are used to infer where regions can be allocated and de-allocated. Recursive functions are handled using a limited form of polymorphic recursion. The translat...

متن کامل

Implementation of the Typed Call - by - Value - calculus using a Stack

We present a translation scheme for the polymorphi-cally typed call-by-value-calculus. All runtime values , including function closures, are put into regions. The store consists of a stack of regions. Region inference and eeect inference are used to infer where regions can be allocated and de-allocated. Recursive functions are handled using a limited form of polymor-phic recursion. The translat...

متن کامل

A Theory of Stack Allocation in PolymorphicallyTyped Languages

We present a stack-allocation scheme for the call-by-value lambda calculus typed according to Milner's polymorphic type discipline. All the values a program produces , including function closures, are put into regions at runtime. Regions are allocated and deallocated in a stack-like manner. Region inference and eeect inference is used to infer where regions can be allocated and deallocated. By ...

متن کامل

Storage Use Analysis and its

In this paper we present a new program analysis method which we call Storage Use Analysis. This analysis deduces how objects are used by the program and allows the optimization of their allocation. This analysis can be applied to both statically typed languages (e.g. ML) and latently typed languages (e.g. Scheme). It handles side-eeects, higher order functions, separate compilation and does not...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011